{% set id = random(1..9) + random() %}
<div class="pavo-widget-tabs-productcarousel {{ settings.extra_class ? [ ' ', settings.extra_class ] | join() : '' }}">
    <div class="tabs-productcarousel-content">
        <ul class="nav nav-tabs" id="tabs-productcarousel{{id}}">
            {% set i = 0 %}
            {% for tab, producttab in settings.producttabs %}
                {% if (producttab.products is not empty) %}
                    <li{% if i ==0 %} class="active"{% endif %}>
                        <a href="#tab-{{ tab }}{{ id }}" data-toggle="tab">{{ producttab.title }}</a>
                    </li>
                    {%  set i = i + 1 %}
                {% endif %}
            {% endfor %}
        </ul>
        <div class="tab-content">
            {% set i = 0 %}
            {% for tab, producttab in settings.producttabs if (producttab.products is not empty) %}
                <div class="tab-pane fade{% if i ==0 %} in active{% endif %}" id="tab-{{ tab }}{{ id }}">
                    {% include settings.products_list_layout with { products: producttab.products, settings: settings, carouselOptions: settings.carousel, rows: settings.rows, columns: settings.item } %}
                </div>
                {%  set i = i + 1 %}
            {% endfor %}
        </div>
    </div>
</div>